<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.6"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>PU2CLR Si4735 Arduino Library: Tools method</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectlogo"><img alt="Logo" src="logo_si4735.png"/></td>
  <td id="projectalign">
   <div id="projectname">PU2CLR Si4735 Arduino Library<span id="projectnumber">&#160;2.1.4</span>
   </div>
   <div id="projectbrief">Arduino Library for Si47XX Devices - By Ricardo Lima Caratti</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.6 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('group__group18.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">Tools method</div></div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gaecfcd50dbb3d95d66c8cdc77d52af63c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group18.html#gaecfcd50dbb3d95d66c8cdc77d52af63c">SI4735::setI2CLowSpeedMode</a> (void)</td></tr>
<tr class="memdesc:gaecfcd50dbb3d95d66c8cdc77d52af63c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets I2C bus to 10kHz.  <br /></td></tr>
<tr class="separator:gaecfcd50dbb3d95d66c8cdc77d52af63c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga00ade87631677b8cc88098d0b55cd5a4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group18.html#ga00ade87631677b8cc88098d0b55cd5a4">SI4735::setI2CStandardMode</a> (void)</td></tr>
<tr class="memdesc:ga00ade87631677b8cc88098d0b55cd5a4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets I2C bus to 100kHz.  <br /></td></tr>
<tr class="separator:ga00ade87631677b8cc88098d0b55cd5a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7bb3214f70381cf26bb93f96729d641e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group18.html#ga7bb3214f70381cf26bb93f96729d641e">SI4735::setI2CFastMode</a> (void)</td></tr>
<tr class="memdesc:ga7bb3214f70381cf26bb93f96729d641e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets I2C bus to 400kHz.  <br /></td></tr>
<tr class="separator:ga7bb3214f70381cf26bb93f96729d641e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7433b4e80fd3b501efeae7973d29c985"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group18.html#ga7433b4e80fd3b501efeae7973d29c985">SI4735::setI2CFastModeCustom</a> (long value=500000)</td></tr>
<tr class="memdesc:ga7433b4e80fd3b501efeae7973d29c985"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the I2C bus to a given value. ATTENTION: use this function with caution.  <br /></td></tr>
<tr class="separator:ga7433b4e80fd3b501efeae7973d29c985"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0a4b4ffbb7e3f2555a16e194eecfc6a1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group18.html#ga0a4b4ffbb7e3f2555a16e194eecfc6a1">SI4735::setAudioMuteMcuPin</a> (int8_t pin)</td></tr>
<tr class="memdesc:ga0a4b4ffbb7e3f2555a16e194eecfc6a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the Audio Mute Mcu Pin.  <br /></td></tr>
<tr class="separator:ga0a4b4ffbb7e3f2555a16e194eecfc6a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga54a3a0f412aa6318df0046d478bd134f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group18.html#ga54a3a0f412aa6318df0046d478bd134f">SI4735::setHardwareAudioMute</a> (bool on)</td></tr>
<tr class="memdesc:ga54a3a0f412aa6318df0046d478bd134f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the Hardware Audio Mute.  <br /></td></tr>
<tr class="separator:ga54a3a0f412aa6318df0046d478bd134f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga133ec11bfc2c68100b47a63da4484767"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group18.html#ga133ec11bfc2c68100b47a63da4484767">SI4735::convertToChar</a> (uint16_t value, char *strValue, uint8_t len, uint8_t dot, uint8_t separator, bool remove_leading_zeros=true)</td></tr>
<tr class="memdesc:ga133ec11bfc2c68100b47a63da4484767"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts a number to a char array.  <br /></td></tr>
<tr class="separator:ga133ec11bfc2c68100b47a63da4484767"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8a42350f66c17582b3346198f041e301"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group18.html#ga8a42350f66c17582b3346198f041e301">SI4735::removeUnwantedChar</a> (char *str, int size)</td></tr>
<tr class="memdesc:ga8a42350f66c17582b3346198f041e301"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes unwanted character from char array.  <br /></td></tr>
<tr class="separator:ga8a42350f66c17582b3346198f041e301"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>A set of functions used to support other functions </p>
<h2 class="groupheader">Function Documentation</h2>
<a id="gaecfcd50dbb3d95d66c8cdc77d52af63c" name="gaecfcd50dbb3d95d66c8cdc77d52af63c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaecfcd50dbb3d95d66c8cdc77d52af63c">&#9670;&#160;</a></span>setI2CLowSpeedMode()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SI4735::setI2CLowSpeedMode </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets I2C bus to 10kHz. </p>
<p>The functions below modify the clock frequency for I2C communication. 100kHz is usually the baseline. Use one of these funcition if you have a problem on the default configuration. </p>

</div>
</div>
<a id="ga00ade87631677b8cc88098d0b55cd5a4" name="ga00ade87631677b8cc88098d0b55cd5a4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga00ade87631677b8cc88098d0b55cd5a4">&#9670;&#160;</a></span>setI2CStandardMode()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SI4735::setI2CStandardMode </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets I2C bus to 100kHz. </p>

</div>
</div>
<a id="ga7bb3214f70381cf26bb93f96729d641e" name="ga7bb3214f70381cf26bb93f96729d641e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7bb3214f70381cf26bb93f96729d641e">&#9670;&#160;</a></span>setI2CFastMode()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SI4735::setI2CFastMode </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets I2C bus to 400kHz. </p>

</div>
</div>
<a id="ga7433b4e80fd3b501efeae7973d29c985" name="ga7433b4e80fd3b501efeae7973d29c985"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7433b4e80fd3b501efeae7973d29c985">&#9670;&#160;</a></span>setI2CFastModeCustom()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SI4735::setI2CFastModeCustom </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>value</em> = <code>500000</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets the I2C bus to a given value. ATTENTION: use this function with caution. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>in Hz. For example: The values 500000 sets the bus to 500kHz. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga0a4b4ffbb7e3f2555a16e194eecfc6a1" name="ga0a4b4ffbb7e3f2555a16e194eecfc6a1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0a4b4ffbb7e3f2555a16e194eecfc6a1">&#9670;&#160;</a></span>setAudioMuteMcuPin()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SI4735::setAudioMuteMcuPin </td>
          <td>(</td>
          <td class="paramtype">int8_t&#160;</td>
          <td class="paramname"><em>pin</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets the Audio Mute Mcu Pin. </p>
<p>This function sets the mcu digital pin you want to use to control the external audio mute circuit.</p>
<p>Some users may be uncomfortable with the loud popping of the speaker during some transitions caused by some SI47XX commands.</p>
<p>This problem occurs during the transition from the power down to power up.</p>
<p>For example, when the user changes bands (FM to AM or AM to FM), the Si47XX devices must be powered down and powered up again.</p>
<p>If you have a mute circuit attached to a pin on the MCU, then you can control the mute circuit from the MCU with this function.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__group18.html#ga54a3a0f412aa6318df0046d478bd134f" title="Sets the Hardware Audio Mute.">setHardwareAudioMute</a> </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pin</td><td>if 0 or greater, sets the MCU digital pin that controls the external circuit. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga54a3a0f412aa6318df0046d478bd134f" name="ga54a3a0f412aa6318df0046d478bd134f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga54a3a0f412aa6318df0046d478bd134f">&#9670;&#160;</a></span>setHardwareAudioMute()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SI4735::setHardwareAudioMute </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>on</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets the Hardware Audio Mute. </p>
<p>Turns the Hardware audio mute on or off</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__group18.html#ga0a4b4ffbb7e3f2555a16e194eecfc6a1" title="Sets the Audio Mute Mcu Pin.">setAudioMuteMcuPin</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">on</td><td>True or false </td></tr>
  </table>
  </dd>
</dl>

<p class="reference">Referenced by <a class="el" href="group__group07.html#gaa554b3390fb6c5a4d6661b96afae73ae">SI4735::powerDown()</a>, <a class="el" href="group__group07.html#ga3e228da65641f4dcf4253262e19bde9b">SI4735::radioPowerUp()</a>, and <a class="el" href="group__group07.html#gaf8d0ff88ec989d714ab63da39f3897b4">SI4735::setup()</a>.</p>

</div>
</div>
<a id="ga133ec11bfc2c68100b47a63da4484767" name="ga133ec11bfc2c68100b47a63da4484767"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga133ec11bfc2c68100b47a63da4484767">&#9670;&#160;</a></span>convertToChar()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SI4735::convertToChar </td>
          <td>(</td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>strValue</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>dot</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>separator</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>remove_leading_zeros</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Converts a number to a char array. </p>
<p>It is useful to mitigate memory space used by functions like sprintf or other generic similar functions</p>
<p>You can use it to format frequency using decimal or thousand separator and also to convert small numbers.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>value to be converted </td></tr>
    <tr><td class="paramname">strValue</td><td>char array that will be receive the converted value </td></tr>
    <tr><td class="paramname">len</td><td>final string size (in bytes) </td></tr>
    <tr><td class="paramname">dot</td><td>the decimal or thousand separator position </td></tr>
    <tr><td class="paramname">separator</td><td>symbol "." or "," </td></tr>
    <tr><td class="paramname">remove_leading_zeros</td><td>if true removes up to two leading zeros (default is true) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga8a42350f66c17582b3346198f041e301" name="ga8a42350f66c17582b3346198f041e301"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8a42350f66c17582b3346198f041e301">&#9670;&#160;</a></span>removeUnwantedChar()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SI4735::removeUnwantedChar </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Removes unwanted character from char array. </p>
<p>replaces non-printable characters to spaces </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">*str</td><td>- string char array </td></tr>
    <tr><td class="paramname">size</td><td>- char array size </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.6 </li>
  </ul>
</div>
</body>
</html>
